import React from 'react';

// pc模块

import PcRouter from './router/pc_router'
import MobileRouter from './router/mobile_router'

const RootRouter = () => {
  let windowWidth = 0;
  try {
    // windowWidth = window.screen.availWidth || document.body.clientWidth || 1200;
    windowWidth = window.screen.availWidth || 1200;
  } catch (e) {
    console.log(e) //eslint-disable-line
  }
  const isPc = windowWidth > 1024
  return isPc ? <PcRouter /> : <MobileRouter />
}

export default RootRouter
